//
//  ViewController.swift
//  ZLPopMenuSwift
//
//  Created by zzl on 01/21/2025.
//  Copyright (c) 2025 zzl. All rights reserved.
//

import UIKit
import ZLPopMenuSwift

class ViewController: UIViewController {
    @IBOutlet weak var button: UIButton!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    @IBAction func show(_ sender: Any) {
        let items = [
            ZLPopMenuItem(title: "Item 1", image: UIImage(named: "action_pause_small")),
            ZLPopMenuItem(title: "Item 2", image: UIImage(named: "action_play_small")),
            ZLPopMenuItem(title: "Item 3", image: UIImage(named: "record_hd_small"))
        ]
        ZLPopMenu.show(by: self.button, items: items, direction: .horizontal) { index in
            
        } onCancel: {
            
        }

    }
    
}

